﻿@model IEnumerable<LyyCMS.Core.Models.ArticleCategory>

@{
    ViewData["Title"] = "Index";
}
<div style="margin:0px 10px; padding:20px 0">
    <a asp-action="Create">
        <i class="fas fa-pencil-alt">
        </i>新建文章分类
    </a>

</div>


<div class="card">
    <div class="card-header">
        <h3 class="card-title">文章分类</h3>
    </div>
    <div class="card-body p-0">
        <table class="table table-striped projects">
            <thead>
                <tr>
                    <th style="width: 1%">
                        #
                    </th>
                    <th>
                        @Html.DisplayNameFor(model => model.Title)
                    </th>
                    <th>
                        @Html.DisplayNameFor(model => model.ParentId)
                    </th>
                    <th>
                        @Html.DisplayNameFor(model => model.SortId)
                    </th>
                    <th>
                        @Html.DisplayNameFor(model => model.CreationTime)
                    </th>

                    <th>
                        @Html.DisplayNameFor(model => model.CreatorUserId)
                    </th>
                    <th>
                        @Html.DisplayNameFor(model => model.LastModifierUserId)
                    </th>
                    <th>
                        @Html.DisplayNameFor(model => model.LastModificationTime)
                    </th>
                    
                    <th style="width: 20%">
                    </th>
                </tr>
            </thead>
            <tbody>
                @foreach (var item in Model)
                {
                <tr>
                    <td>
                        #
                    </td>
                    <td>
                        @Html.DisplayFor(modelItem => item.Title)
                    </td>
                    <td>
                        @Html.DisplayFor(modelItem => item.Father.Title)
                    </td>
                    <td>
                        @Html.DisplayFor(modelItem => item.SortId)
                    </td>
                    <td>
                        @Html.DisplayFor(modelItem => item.CreationTime)
                    </td>

                    <td>
                        @Html.DisplayFor(modelItem => item.CreatorUserId)
                    </td>
                    <td>
                        @Html.DisplayFor(modelItem => item.LastModifierUserId)
                    </td>
                    <td>
                        @Html.DisplayFor(modelItem => item.LastModificationTime)
                    </td>
                    <td class="project-actions text-right">
                        <a class="btn btn-primary btn-sm" asp-action="Details" asp-route-id="@item.Id">
                            <i class="fas fa-folder">
                            </i>
                            看
                        </a>
                        <a class="btn btn-info btn-sm" asp-action="Edit" asp-route-id="@item.Id">
                            <i class="fas fa-pencil-alt">
                            </i>
                            改
                        </a>
                        <a class="btn btn-danger btn-sm" asp-action="Delete" asp-route-id="@item.Id">
                            <i class="fas fa-trash">
                            </i>
                            删
                        </a>
                    </td>
                </tr>
                }
            </tbody>
        </table>
    </div>
    <!-- /.card-body -->
</div>

